home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Form & Validation / accept-terms-and-cons.izs next >
Text File  |  2005-08-29  |  2KB  |  68 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Accept Terms & Conditions script
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>Add an "Accept Terms & Conditions" clause to your form with this script. With it, users must explicitly signal their acceptance of your terms/conditions (by checking a box), before he/she can submit the form. 
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>form and form validation<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13. <SCRIPT language=JavaScript>
  14. <!--
  15.  
  16. function checkCheckBox(f){
  17. if (f.agree.checked == false )
  18. {
  19. alert('Please check the box to continue.');
  20. return false;
  21. }else
  22. return true;
  23. }
  24. //-->
  25. </SCRIPT>
  26.  
  27. <form action="/yourscript.cgi-or-your-page.html" method="GET" onsubmit="return checkCheckBox(this)">
  28.  
  29. <!--Enter your form contents here-->
  30.  
  31. <b>By submitting, I agree that all info entered was done accurately & truthfully.</b><br>
  32. I accept: <input type="checkbox" value="0" name="agree">
  33. <input type="submit" value="Submit form">
  34. <input type="button" value="Exit" onclick="document.location.href='/index.html';">
  35. </form>
  36. <!-- END OF SCRIPT -->
  37. <!/SCRIPT>
  38.  
  39. <!PREVIEW>
  40. <!-- START OF SCRIPT -->
  41.  
  42. <SCRIPT language=JavaScript>
  43. <!--
  44.  
  45. function checkCheckBox(f){
  46. if (f.agree.checked == false )
  47. {
  48. alert('Please check the box to continue.');
  49. return false;
  50. }else
  51. return true;
  52. }
  53. //-->
  54. </SCRIPT>
  55.  
  56. <form action="/yourscript.cgi-or-your-page.html" method="GET" onsubmit="return checkCheckBox(this)">
  57.  
  58. <!--Enter your form contents here-->
  59.  
  60. <b>By submitting, I agree that all info entered was done accurately & truthfully.</b><br>
  61. I accept: <input type="checkbox" value="0" name="agree">
  62. <input type="submit" value="Submit form">
  63. <input type="button" value="Exit" onclick="document.location.href='/index.html';">
  64. </form>
  65. <!-- END OF SCRIPT -->
  66. <!/PREVIEW>
  67.  
  68. <!RELATED>NONE<!/RELATED>